#!/bin/bash
# TODO - solve this properly
if [ `arch` = "i386" ]; then
    # mac
    wget -qO- 'http://localhost/~doug/rrlpserver.cgi?GSM.RRLP.ACCURACY=7&GSM.RRLP.RESPONSETIME=4&GSM.RRLP.ALMANAC.URL=687474703a2f2f7777772e6e617663656e2e757363672e676f762f3f706167654e616d653d63757272656e74416c6d616e616326666f726d61743d79756d61&GSM.RRLP.EPHEMERIS.URL=6674703a2f2f6674702e7472696d626c652e636f6d2f7075622f6570682f437572526e784e2e6e6176&GSM.RRLP.ALMANAC.REFRESH.TIME=24.0&GSM.RRLP.EPHEMERIS.REFRESH.TIME=1.0&GSM.RRLP.SEED.LATITUDE=37.357331&GSM.RRLP.SEED.LONGITUDE=-122.037807&GSM.RRLP.SEED.ALTITUDE=0&query=decode&apdu='$1
else
    # itx
    wget -qO- 'http://localhost/rrlpserver.cgi?GSM.RRLP.ACCURACY=7&GSM.RRLP.RESPONSETIME=4&GSM.RRLP.ALMANAC.URL=687474703a2f2f7777772e6e617663656e2e757363672e676f762f3f706167654e616d653d63757272656e74416c6d616e616326666f726d61743d79756d61&GSM.RRLP.EPHEMERIS.URL=6674703a2f2f6674702e7472696d626c652e636f6d2f7075622f6570682f437572526e784e2e6e6176&GSM.RRLP.ALMANAC.REFRESH.TIME=24.0&GSM.RRLP.EPHEMERIS.REFRESH.TIME=1.0&GSM.RRLP.SEED.LATITUDE=37.357331&GSM.RRLP.SEED.LONGITUDE=-122.037807&GSM.RRLP.SEED.ALTITUDE=0&query=decode&apdu='$1
fi

